<?php if($_SESSION['uData']['ulevel'] >= $permissions['Administrator']){ ?>

			<div id="main">
				<a name="UserManagement"></a>
				<h2><a href="" title="">User Management</a></h2>
		<?php 
			/*
			 * This include file is required for the 
			 * operation of the creation/updating of users
			 * 
			 * DO NOT REMOVE THE REQUIRED INCLUDE
			 */
				require_once 'includes/inc.createuser.php';
			/*
			 * DO NOT REMOVE THE REQUIRED INCLUDE
			 */
		?>
				<form method="post" action="">
					<table>
					<tr>
						<td><label>Username</label></td>
						<td><input type="text" name="username" size="30" <?php if(!empty($uData['username'])){print " readonly value='".$uData['username']."'";}?> /></td>
					</tr>
					<tr>
						<td><label>Password</label></td>
						<td><input type="password" name="password" size="30" /></td>
					</tr>
					<tr>
						<td><label>Retype Password</label></td>
						<td><input type="password" name="password2" size="30" /></td>
					</tr>
					<tr>
						<td><label>First Name</label></td>
						<td><input type="text" name="fName" size="30" <?php if(!empty($uData['username'])){print "value='".$uData['fname']."'";}?> /></td>
					</tr>
					<tr>
						<td><label>Last Name</label></td>
						<td><input type="text" name="lName" size="30" <?php if(!empty($uData['username'])){print "value='".$uData['lname']."'";}?> /></td>
					</tr>
					<tr>
						<td><label>Gender</label></td>
						<td>
							<select name="gender">
								<option <?php if((!empty($uData['gender']) && $uData['gender'] == "0") || !isset($uData['gender'])){print "selected";} ?> value='0'>Female</option>
								<option <?php if(!empty($uData['gender']) && $uData['gender'] == "1"){print "selected";} ?> value='1'>Male</option>
							</select>
						</td>
					</tr>
					<tr>
						<td><label>Phone</label></td>
						<td><input type="text" name="phone" size="30" <?php if(!empty($uData['username'])){print "value='".$uData['phone']."'";}?> /></td>
					</tr>
					<tr>
						<td><label>Mobile</label></td>
						<td><input type="text" name="mobile" size="30" <?php if(!empty($uData['username'])){print "value='".$uData['mobile']."'";}?> /></td>
					</tr>
					<tr>
						<td><label>Date of Birth</label></td>
						<td><input type="text" name="dob" size="30" <?php if(!empty($uData['username'])){print "value='".$uData['dob']."'";}?> /></td>
					</tr>
					<tr>
						<td><label>Address</label></td>
						<td><input type="text" name="address" size="50" <?php if(!empty($uData['username'])){print "value='".$uData['address']."'";}?> /></td>
					</tr>
					<tr>
						<td><label>City</label></td>
						<td><input type="text" name="city" size="30" <?php if(!empty($uData['username'])){print "value='".$uData['city']."'";}?> /></td>
					</tr>
					<tr>
						<td><label>Postcode</label></td>
						<td><input type="text" name="postcode" size="10" <?php if(!empty($uData['username'])){print "value='".$uData['postcode']."'";}?> /></td>
					</tr>
					<tr>
						<td><label>Business</label></td>
						<td>
							<select name="bid">
								<option <?php if((!empty($uData['business']) && $uData['business'] == "1") || !isset($uData['business'])){print "selected";} ?>  value='1'>Lateral Plains</option>
								<option <?php if(!empty($uData['business']) && $uData['business'] == "2"){print "selected";} ?> value='2'>Virtualbean</option>
								<option <?php if(!empty($uData['business']) && $uData['business'] == "3"){print "selected";} ?> value='3'>BellaSwan</option>
							</select>
						</td>
					</tr>
					<tr>
						<td><label>Privileges</label></td>
						<td>
							<select name="ulevel">
								<option <?php if((!empty($uData['ulevel']) && $uData['ulevel'] == "1") || !isset($uData['ulevel'])){print "selected";} ?> value='2'>Registered</option>
								<option <?php if(!empty($uData['ulevel']) && $uData['ulevel'] == "3"){print "selected";} ?> value='3'>Support</option>
								<option <?php if(!empty($uData['ulevel']) && $uData['ulevel'] == "4"){print "selected";} ?> value='4'>Maintenance</option>
								<option <?php if(!empty($uData['ulevel']) && $uData['ulevel'] == "5"){print "selected";} ?> value='5'>Developer</option>
								<option <?php if(!empty($uData['ulevel']) && $uData['ulevel'] == "6"){print "selected";} ?> value='6'>Staff</option>
								<option <?php if(!empty($uData['ulevel']) && $uData['ulevel'] == "7"){print "selected";} ?> value='7'>Administrator</option>
							</select>
						</td>
					</tr>
					</table>
					<input style="margin-left: 10px; padding: 0 15px; font-size:14px;" class="button" type="submit" name="createAuth" />
				</form>
				<p>
				<strong>If you are uncertain</strong> about anything on this control panel,
				please do not edit anything on this page and seek help.
				</p>
			<!-- main ends -->
			</div>
<?php }else{ ?>
		<div id="main">
			<a name="UserManagement"></a>
			<h2><a href="" title="">User Management</a></h2>
			<p>
			<strong>You do not have permissions to view this page.</strong>
			</p>
		<!-- main ends -->
		</div>
<?php } ?>